import request from "@/utils/http";
/** 请求分类数据  获取一级分类*/
export const getCategoriesAPI = () => {
    return request({ url: "/category/top" });
}; 
// 地址管理
export const getAddressAPI = () => {
    return request({
        url: "/member/address",
    });
};

/**
 * 更新收货地址
 */
export const updateAddressAPI = (id, data) => {
    return request({
        url: `/member/address/${id}`,
        method: "put",
        data,
    });
};